home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / MFC / include / afxcmn.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  35.9 KB  |  1,164 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1998 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. #ifndef __AFXCMN_H__
  12. #define __AFXCMN_H__
  13.  
  14. #ifdef _AFX_NO_AFXCMN_SUPPORT
  15.     #error Windows Common Control classes not supported in this library variant.
  16. #endif
  17.  
  18. #ifndef __AFXWIN_H__
  19.     #include <afxwin.h>
  20. #endif
  21.  
  22. #ifdef _AFX_MINREBUILD
  23. #pragma component(minrebuild, off)
  24. #endif
  25. #ifndef _AFX_FULLTYPEINFO
  26. #pragma component(mintypeinfo, on)
  27. #endif
  28.  
  29. #ifndef IMAGE_BITMAP
  30. #define IMAGE_BITMAP 0
  31. #endif
  32.  
  33. /////////////////////////////////////////////////////////////////////////////
  34.  
  35. #ifdef _AFX_PACKING
  36. #pragma pack(push, _AFX_PACKING)
  37. #endif
  38.  
  39. #ifndef _AFX_NO_RICHEDIT_SUPPORT
  40.     #ifndef _RICHEDIT_
  41.         #include <richedit.h>
  42.     #endif
  43.     #ifdef __AFXOLE_H__  // only include richole if OLE support is included
  44.         #ifndef _RICHOLE_
  45.             #include <richole.h>
  46.             #define _RICHOLE_
  47.         #endif
  48.     #else
  49.         struct IRichEditOle;
  50.         struct IRichEditOleCallback;
  51.     #endif
  52. #endif
  53.  
  54. /////////////////////////////////////////////////////////////////////////////
  55. // AFXCMN - MFC COMCTL32 Control Classes
  56.  
  57. // Classes declared in this file
  58.  
  59. //TOOLINFO
  60.     class CToolInfo;
  61.  
  62. //CObject
  63.     class CImageList;
  64.     //CCmdTarget;
  65.         //CWnd
  66.             // class CListBox;
  67.                 class CDragListBox;
  68.             class CListCtrl;
  69.             class CTreeCtrl;
  70.             class CSpinButtonCtrl;
  71.             class CHeaderCtrl;
  72.             class CSliderCtrl;
  73.             class CProgressCtrl;
  74.             // class CComboBox;
  75.                 class CComboBoxEx;
  76.             class CHotKeyCtrl;
  77.             class CToolTipCtrl;
  78.             class CTabCtrl;
  79.             class CAnimateCtrl;
  80.             class CToolBarCtrl;
  81.             class CStatusBarCtrl;
  82.             class CRichEditCtrl;
  83.             class CIPAddressCtrl;
  84.  
  85. #undef AFX_DATA
  86. #define AFX_DATA AFX_CORE_DATA
  87.  
  88. #if !defined(_WIN32_WCE)
  89. /////////////////////////////////////////////////////////////////////////////
  90. // CToolInfo
  91.  
  92. #ifdef _UNICODE
  93. class CToolInfo : public tagTOOLINFOW
  94. #else
  95. class CToolInfo : public tagTOOLINFOA
  96. #endif
  97. {
  98. public:
  99.     TCHAR szText[256];
  100. };
  101.  
  102. /////////////////////////////////////////////////////////////////////////////
  103. // CDragListBox
  104.  
  105. class CDragListBox : public CListBox
  106. {
  107.     DECLARE_DYNAMIC(CDragListBox)
  108.  
  109. // Constructors
  110. public:
  111.     CDragListBox();
  112.  
  113. // Attributes
  114.     int ItemFromPt(CPoint pt, BOOL bAutoScroll = TRUE) const;
  115.  
  116. // Operations
  117.     virtual void DrawInsert(int nItem);
  118.  
  119. // Overridables
  120.     virtual BOOL BeginDrag(CPoint pt);
  121.     virtual void CancelDrag(CPoint pt);
  122.     virtual UINT Dragging(CPoint pt);
  123.     virtual void Dropped(int nSrcIndex, CPoint pt);
  124.  
  125. // Implementation
  126. public:
  127.     int m_nLast;
  128.     void DrawSingle(int nIndex);
  129.     virtual void PreSubclassWindow();
  130.     virtual ~CDragListBox();
  131. protected:
  132.     virtual BOOL OnChildNotify(UINT, WPARAM, LPARAM, LRESULT*);
  133. };
  134. #endif // _WIN32_WCE
  135.  
  136. /////////////////////////////////////////////////////////////////////////////
  137. // CStatusBarCtrl
  138.  
  139. class CStatusBarCtrl : public CWnd
  140. {
  141.     DECLARE_DYNAMIC(CStatusBarCtrl)
  142.  
  143. // Constructors
  144. public:
  145.     CStatusBarCtrl();
  146.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  147.  
  148. // Attributes
  149.     BOOL SetText(LPCTSTR lpszText, int nPane, int nType);
  150.     CString GetText(int nPane, int* pType = NULL) const;
  151.     int GetText(LPCTSTR lpszText, int nPane, int* pType = NULL) const;
  152.     int GetTextLength(int nPane, int* pType = NULL) const;
  153.     BOOL SetParts(int nParts, int* pWidths);
  154.     int GetParts(int nParts, int* pParts) const;
  155.     BOOL GetBorders(int* pBorders) const;
  156.     BOOL GetBorders(int& nHorz, int& nVert, int& nSpacing) const;
  157.     void SetMinHeight(int nMin);
  158.     BOOL SetSimple(BOOL bSimple = TRUE);
  159.     BOOL GetRect(int nPane, LPRECT lpRect) const;
  160.     BOOL IsSimple() const;
  161. WCE_DEL CString GetTipText(int nPane) const;
  162. WCE_DEL void SetTipText(int nPane, LPCTSTR pszTipText);
  163. WCE_DEL COLORREF SetBkColor(COLORREF cr);
  164. WCE_DEL BOOL SetIcon(int nPane, HICON hIcon);
  165.  
  166. // Overridables
  167.     virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
  168.  
  169. // Implementation
  170. public:
  171.     virtual ~CStatusBarCtrl();
  172. protected:
  173.     virtual BOOL OnChildNotify(UINT, WPARAM, LPARAM, LRESULT*);
  174. };
  175.  
  176. /////////////////////////////////////////////////////////////////////////////
  177. // CListCtrl
  178.  
  179. class CListCtrl : public CWnd
  180. {
  181.     DECLARE_DYNAMIC(CListCtrl)
  182.  
  183. // Constructors
  184. public:
  185.     CListCtrl();
  186.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  187.  
  188. // Attributes
  189.     COLORREF GetBkColor() const;
  190.     BOOL SetBkColor(COLORREF cr);
  191.     CImageList* GetImageList(int nImageList) const;
  192.     CImageList* SetImageList(CImageList* pImageList, int nImageListType);
  193.     int GetItemCount() const;
  194.     BOOL GetItem(LVITEM* pItem) const;
  195.     BOOL SetItem(const LVITEM* pItem);
  196.     BOOL SetItem(int nItem, int nSubItem, UINT nMask, LPCTSTR lpszItem,
  197.         int nImage, UINT nState, UINT nStateMask, LPARAM lParam);
  198.     UINT GetCallbackMask() const;
  199.     BOOL SetCallbackMask(UINT nMask);
  200.     int GetNextItem(int nItem, int nFlags) const;
  201.     POSITION GetFirstSelectedItemPosition() const;
  202.     int GetNextSelectedItem(POSITION& pos) const;
  203.     BOOL GetItemRect(int nItem, LPRECT lpRect, UINT nCode) const;
  204.     BOOL SetItemPosition(int nItem, POINT pt);
  205.     BOOL GetItemPosition(int nItem, LPPOINT lpPoint) const;
  206.     int GetStringWidth(LPCTSTR lpsz) const;
  207.     CEdit* GetEditControl() const;
  208.     BOOL GetColumn(int nCol, LVCOLUMN* pColumn) const;
  209.     BOOL SetColumn(int nCol, const LVCOLUMN* pColumn);
  210.     int GetColumnWidth(int nCol) const;
  211.     BOOL SetColumnWidth(int nCol, int cx);
  212.     BOOL GetViewRect(LPRECT lpRect) const;
  213.     COLORREF GetTextColor() const;
  214.     BOOL SetTextColor(COLORREF cr);
  215.     COLORREF GetTextBkColor() const;
  216.     BOOL SetTextBkColor(COLORREF cr);
  217.     int GetTopIndex() const;
  218.     int GetCountPerPage() const;
  219.     BOOL GetOrigin(LPPOINT lpPoint) const;
  220.     BOOL SetItemState(int nItem, LVITEM* pItem);
  221.     BOOL SetItemState(int nItem, UINT nState, UINT nMask);
  222.     UINT GetItemState(int nItem, UINT nMask) const;
  223.     CString GetItemText(int nItem, int nSubItem) const;
  224.     int GetItemText(int nItem, int nSubItem, LPTSTR lpszText, int nLen) const; 
  225.     BOOL SetItemText(int nItem, int nSubItem, LPCTSTR lpszText);
  226.     void SetItemCount(int nItems);
  227.     BOOL SetItemData(int nItem, DWORD dwData);
  228.     DWORD GetItemData(int nItem) const;
  229.     UINT GetSelectedCount() const;
  230.     BOOL SetColumnOrderArray(int iCount, LPINT piArray);
  231.     BOOL GetColumnOrderArray(LPINT piArray, int iCount = -1);
  232.     CSize SetIconSpacing(CSize size);
  233.     CSize SetIconSpacing(int cx, int cy);
  234.     CHeaderCtrl* GetHeaderCtrl();
  235. WCE_DEL    HCURSOR GetHotCursor();
  236. WCE_DEL    HCURSOR SetHotCursor(HCURSOR hc);
  237.     BOOL GetSubItemRect(int iItem, int iSubItem, int nArea, CRect& ref);
  238. WCE_DEL    int GetHotItem();
  239. WCE_DEL    int SetHotItem(int iIndex);
  240.     int GetSelectionMark();
  241.     int SetSelectionMark(int iIndex);
  242.     DWORD GetExtendedStyle();
  243.     DWORD SetExtendedStyle(DWORD dwNewStyle);
  244.     int SubItemHitTest(LPLVHITTESTINFO pInfo);
  245. WCE_DEL void SetWorkAreas(int nWorkAreas, LPRECT lpRect);
  246.     BOOL SetItemCountEx(int iCount, DWORD dwFlags = LVSICF_NOINVALIDATEALL);
  247.     CSize ApproximateViewRect(CSize sz = CSize(-1, -1), int iCount = -1) const;
  248. WCE_DEL BOOL GetBkImage(LVBKIMAGE* plvbkImage) const;
  249. WCE_DEL DWORD GetHoverTime() const;
  250. WCE_DEL void GetWorkAreas(int nWorkAreas, LPRECT prc) const;
  251.     BOOL SetBkImage(HBITMAP hbm, BOOL fTile = TRUE, int xOffsetPercent = 0, int yOffsetPercent = 0);
  252.     BOOL SetBkImage(LPTSTR pszUrl, BOOL fTile = TRUE, int xOffsetPercent = 0, int yOffsetPercent = 0);
  253. WCE_DEL BOOL SetBkImage(LVBKIMAGE* plvbkImage);
  254. WCE_DEL DWORD SetHoverTime(DWORD dwHoverTime = (DWORD)-1);
  255. WCE_DEL UINT GetNumberOfWorkAreas() const;
  256.     BOOL GetCheck(int nItem) const;
  257.     BOOL SetCheck(int nItem, BOOL fCheck = TRUE);
  258.  
  259. // Operations
  260.     int InsertItem(const LVITEM* pItem);
  261.     int InsertItem(int nItem, LPCTSTR lpszItem);
  262.     int InsertItem(int nItem, LPCTSTR lpszItem, int nImage);
  263.     BOOL DeleteItem(int nItem);
  264.     BOOL DeleteAllItems();
  265.     int FindItem(LVFINDINFO* pFindInfo, int nStart = -1) const;
  266.     int HitTest(LVHITTESTINFO* pHitTestInfo) const;
  267.     int HitTest(CPoint pt, UINT* pFlags = NULL) const;
  268.     BOOL EnsureVisible(int nItem, BOOL bPartialOK);
  269.     BOOL Scroll(CSize size);
  270.     BOOL RedrawItems(int nFirst, int nLast);
  271.     BOOL Arrange(UINT nCode);
  272.     CEdit* EditLabel(int nItem);
  273.     int InsertColumn(int nCol, const LVCOLUMN* pColumn);
  274.     int InsertColumn(int nCol, LPCTSTR lpszColumnHeading,
  275.         int nFormat = LVCFMT_LEFT, int nWidth = -1, int nSubItem = -1);
  276.     BOOL DeleteColumn(int nCol);
  277.     CImageList* CreateDragImage(int nItem, LPPOINT lpPoint);
  278.     BOOL Update(int nItem);
  279.     BOOL SortItems(PFNLVCOMPARE pfnCompare, DWORD dwData);
  280.  
  281. // Overridables
  282.     virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
  283.  
  284. // Implementation
  285. public:
  286.     int InsertItem(UINT nMask, int nItem, LPCTSTR lpszItem, UINT nState,
  287.         UINT nStateMask, int nImage, LPARAM lParam);
  288.     virtual ~CListCtrl();
  289. protected:
  290.     void RemoveImageList(int nImageList);
  291.     virtual BOOL OnChildNotify(UINT, WPARAM, LPARAM, LRESULT*);
  292. protected:
  293.     //{{AFX_MSG(CListCtrl)
  294.     afx_msg void OnNcDestroy();
  295.     //}}AFX_MSG
  296.     DECLARE_MESSAGE_MAP()
  297. };
  298.  
  299. /////////////////////////////////////////////////////////////////////////////
  300. // CTreeCtrl
  301.  
  302. class CTreeCtrl : public CWnd
  303. {
  304.     DECLARE_DYNAMIC(CTreeCtrl)
  305.  
  306. // Constructors
  307. public:
  308.     CTreeCtrl();
  309.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  310.  
  311. // Attributes
  312.     BOOL GetItemRect(HTREEITEM hItem, LPRECT lpRect, BOOL bTextOnly) const;
  313.     UINT GetCount() const;
  314.     UINT GetIndent() const;
  315.     void SetIndent(UINT nIndent);
  316.     CImageList* GetImageList(UINT nImageList) const;
  317.     CImageList* SetImageList(CImageList* pImageList, int nImageListType);
  318.     HTREEITEM GetNextItem(HTREEITEM hItem, UINT nCode) const;
  319.     HTREEITEM GetChildItem(HTREEITEM hItem) const;
  320.     HTREEITEM GetNextSiblingItem(HTREEITEM hItem) const;
  321.     HTREEITEM GetPrevSiblingItem(HTREEITEM hItem) const;
  322.     HTREEITEM GetParentItem(HTREEITEM hItem) const;
  323.     HTREEITEM GetFirstVisibleItem() const;
  324.     HTREEITEM GetNextVisibleItem(HTREEITEM hItem) const;
  325.     HTREEITEM GetPrevVisibleItem(HTREEITEM hItem) const;
  326.     HTREEITEM GetSelectedItem() const;
  327.     HTREEITEM GetDropHilightItem() const;
  328.     HTREEITEM GetRootItem() const;
  329.     BOOL GetItem(TVITEM* pItem) const;
  330.     CString GetItemText(HTREEITEM hItem) const;
  331.     BOOL GetItemImage(HTREEITEM hItem, int& nImage, int& nSelectedImage) const;
  332.     UINT GetItemState(HTREEITEM hItem, UINT nStateMask) const;
  333.     DWORD GetItemData(HTREEITEM hItem) const;
  334.     BOOL SetItem(TVITEM* pItem);
  335.     BOOL SetItem(HTREEITEM hItem, UINT nMask, LPCTSTR lpszItem, int nImage,
  336.         int nSelectedImage, UINT nState, UINT nStateMask, LPARAM lParam);
  337.     BOOL SetItemText(HTREEITEM hItem, LPCTSTR lpszItem);
  338.     BOOL SetItemImage(HTREEITEM hItem, int nImage, int nSelectedImage);
  339.     BOOL SetItemState(HTREEITEM hItem, UINT nState, UINT nStateMask);
  340.     BOOL SetItemData(HTREEITEM hItem, DWORD dwData);
  341.     BOOL ItemHasChildren(HTREEITEM hItem) const;
  342.     CEdit* GetEditControl() const;
  343.     UINT GetVisibleCount() const;
  344. #if !defined(_WIN32_WCE_NO_TOOLTIPS)
  345.     CToolTipCtrl* GetToolTips() const;
  346.     CToolTipCtrl* SetToolTips(CToolTipCtrl* pWndTip);
  347. #endif // _WIN32_WCE_NO_TOOLTIPS
  348. WCE_DEL COLORREF GetBkColor() const;
  349. WCE_DEL COLORREF SetBkColor(COLORREF clr);
  350. WCE_DEL SHORT GetItemHeight() const;
  351. WCE_DEL SHORT SetItemHeight(SHORT cyHeight);
  352. WCE_DEL COLORREF GetTextColor() const;
  353. WCE_DEL COLORREF SetTextColor(COLORREF clr);
  354. WCE_DEL BOOL SetInsertMark(HTREEITEM hItem, BOOL fAfter = TRUE);
  355.     BOOL GetCheck(HTREEITEM hItem) const;
  356.     BOOL SetCheck(HTREEITEM hItem, BOOL fCheck = TRUE);
  357. WCE_DEL COLORREF GetInsertMarkColor() const;
  358. WCE_DEL COLORREF SetInsertMarkColor(COLORREF clrNew);
  359.  
  360. // Operations
  361.     HTREEITEM InsertItem(LPTVINSERTSTRUCT lpInsertStruct);
  362.     HTREEITEM InsertItem(UINT nMask, LPCTSTR lpszItem, int nImage,
  363.         int nSelectedImage, UINT nState, UINT nStateMask, LPARAM lParam,
  364.         HTREEITEM hParent, HTREEITEM hInsertAfter);
  365.     HTREEITEM InsertItem(LPCTSTR lpszItem, HTREEITEM hParent = TVI_ROOT,
  366.         HTREEITEM hInsertAfter = TVI_LAST);
  367.     HTREEITEM InsertItem(LPCTSTR lpszItem, int nImage, int nSelectedImage,
  368.         HTREEITEM hParent = TVI_ROOT, HTREEITEM hInsertAfter = TVI_LAST);
  369.     BOOL DeleteItem(HTREEITEM hItem);
  370.     BOOL DeleteAllItems();
  371.     BOOL Expand(HTREEITEM hItem, UINT nCode);
  372.     BOOL Select(HTREEITEM hItem, UINT nCode);
  373.     BOOL SelectItem(HTREEITEM hItem);
  374.     BOOL SelectDropTarget(HTREEITEM hItem);
  375.     BOOL SelectSetFirstVisible(HTREEITEM hItem);
  376.     CEdit* EditLabel(HTREEITEM hItem);
  377.     HTREEITEM HitTest(CPoint pt, UINT* pFlags = NULL) const;
  378.     HTREEITEM HitTest(TVHITTESTINFO* pHitTestInfo) const;
  379.     CImageList* CreateDragImage(HTREEITEM hItem);
  380.     BOOL SortChildren(HTREEITEM hItem);
  381.     BOOL EnsureVisible(HTREEITEM hItem);
  382.     BOOL SortChildrenCB(LPTVSORTCB pSort);
  383.  
  384. // Implementation
  385. protected:
  386.     void RemoveImageList(int nImageList);
  387. public:
  388.     virtual ~CTreeCtrl();
  389.     //{{AFX_MSG(CTreeCtrl)
  390.     afx_msg void OnDestroy();
  391.     //}}AFX_MSG
  392.     DECLARE_MESSAGE_MAP()
  393. };
  394.  
  395. /////////////////////////////////////////////////////////////////////////////
  396. // CSpinButtonCtrl
  397.  
  398. class CSpinButtonCtrl : public CWnd
  399. {
  400.     DECLARE_DYNAMIC(CSpinButtonCtrl)
  401.  
  402. // Constructors
  403. public:
  404.     CSpinButtonCtrl();
  405.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  406.  
  407. // Attributes
  408.     BOOL SetAccel(int nAccel, UDACCEL* pAccel);
  409.     UINT GetAccel(int nAccel, UDACCEL* pAccel) const;
  410.     int SetBase(int nBase);
  411.     UINT GetBase() const;
  412.     CWnd* SetBuddy(CWnd* pWndBuddy);
  413.     CWnd* GetBuddy() const;
  414.     int SetPos(int nPos);
  415.     int GetPos() const;
  416.     void SetRange(int nLower, int nUpper);
  417.     void SetRange32(int nLower, int nUpper);
  418.     DWORD GetRange() const;
  419.     void GetRange(int &lower, int& upper) const;
  420.     void GetRange32(int &lower, int& upper) const;
  421.  
  422. // Implementation
  423. public:
  424.     virtual ~CSpinButtonCtrl();
  425. };
  426.  
  427. /////////////////////////////////////////////////////////////////////////////
  428. // CSliderCtrl
  429.  
  430. class CSliderCtrl : public CWnd
  431. {
  432.     DECLARE_DYNAMIC(CSliderCtrl)
  433.  
  434. // Constructors
  435. public:
  436.     CSliderCtrl();
  437.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  438.  
  439. // Attributes
  440.     int GetLineSize() const;
  441.     int SetLineSize(int nSize);
  442.     int GetPageSize() const;
  443.     int SetPageSize(int nSize);
  444.     int GetRangeMax() const;
  445.     int GetRangeMin() const;
  446.     void GetRange(int& nMin, int& nMax) const;
  447.     void SetRangeMin(int nMin, BOOL bRedraw = FALSE);
  448.     void SetRangeMax(int nMax, BOOL bRedraw = FALSE);
  449.     void SetRange(int nMin, int nMax, BOOL bRedraw = FALSE);
  450.     void GetSelection(int& nMin, int& nMax) const;
  451.     void SetSelection(int nMin, int nMax);
  452.     void GetChannelRect(LPRECT lprc) const;
  453.     void GetThumbRect(LPRECT lprc) const;
  454.     int GetPos() const;
  455.     void SetPos(int nPos);
  456.     UINT GetNumTics() const;
  457.     DWORD* GetTicArray() const;
  458.     int GetTic(int nTic) const;
  459.     int GetTicPos(int nTic) const;
  460.     BOOL SetTic(int nTic);
  461.     void SetTicFreq(int nFreq);
  462.     CWnd* GetBuddy(BOOL fLocation = TRUE) const;
  463.     CWnd* SetBuddy(CWnd* pWndBuddy, BOOL fLocation = TRUE);
  464. #if !defined(_WIN32_WCE_NO_TOOLTIPS)
  465.     CToolTipCtrl* GetToolTips() const;
  466.     void SetToolTips(CToolTipCtrl* pWndTip);
  467.     int SetTipSide(int nLocation);
  468. #endif // _WIN32_WCE_NO_TOOLTIPS
  469.  
  470. // Operations
  471.     void ClearSel(BOOL bRedraw = FALSE);
  472.     void VerifyPos();
  473.     void ClearTics(BOOL bRedraw = FALSE);
  474.  
  475. // Implementation
  476. public:
  477.     virtual ~CSliderCtrl();
  478. };
  479.  
  480. /////////////////////////////////////////////////////////////////////////////
  481. // CProgressCtrl
  482.  
  483. class CProgressCtrl : public CWnd
  484. {
  485.     DECLARE_DYNAMIC(CProgressCtrl)
  486.  
  487. // Constructors
  488. public:
  489.     CProgressCtrl();
  490.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  491.  
  492. // Attributes
  493.     void SetRange(short nLower, short nUpper);
  494.     void SetRange32(int nLower, int nUpper);
  495.     void GetRange(int& nLower, int& nUpper);
  496.     int GetPos();
  497.     int SetPos(int nPos);
  498.     int OffsetPos(int nPos);
  499.     int SetStep(int nStep);
  500.  
  501. // Operations
  502.     int StepIt();
  503.  
  504. // Implementation
  505. public:
  506.     virtual ~CProgressCtrl();
  507. };
  508.  
  509. #if !defined(_WIN32_WCE)
  510. /////////////////////////////////////////////////////////////////////////////
  511. // CComboBoxEx
  512.  
  513. class CComboBoxEx : public CComboBox
  514. {
  515.     DECLARE_DYNAMIC(CComboBoxEx)
  516.  
  517. // Constructors
  518. public:
  519.     CComboBoxEx();
  520.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  521.  
  522. // Operations
  523.     int DeleteItem(int iIndex);
  524.     BOOL GetItem(COMBOBOXEXITEM* pCBItem);
  525.     int InsertItem(const COMBOBOXEXITEM* pCBItem);
  526.     BOOL SetItem(const COMBOBOXEXITEM* pCBItem);
  527.  
  528. // Attributes
  529.     BOOL HasEditChanged();
  530.     DWORD GetExtendedStyle() const;
  531.     DWORD SetExtendedStyle(DWORD dwExMask, DWORD dwExStyles);
  532.     CEdit* GetEditCtrl();
  533.     CComboBox* GetComboBoxCtrl();
  534.     CImageList* GetImageList() const;
  535.     CImageList* SetImageList(CImageList* pImageList);
  536.  
  537. // Implementation
  538. public:
  539.     virtual ~CComboBoxEx();
  540. };
  541. #endif // _WIN32_WCE
  542.  
  543. /////////////////////////////////////////////////////////////////////////////
  544. // CHeaderCtrl
  545.  
  546. class CHeaderCtrl : public CWnd
  547. {
  548.     DECLARE_DYNAMIC(CHeaderCtrl)
  549.  
  550. // Constructors
  551. public:
  552.     CHeaderCtrl();
  553.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  554.  
  555. // Attributes
  556.     int GetItemCount() const;
  557.     BOOL GetItem(int nPos, HDITEM* pHeaderItem) const;
  558.     BOOL SetItem(int nPos, HDITEM* pHeaderItem);
  559.     CImageList* GetImageList() const;
  560.     CImageList* SetImageList(CImageList* pImageList);
  561.     BOOL GetItemRect(int nIndex, LPRECT lpRect) const;
  562.     BOOL GetOrderArray(LPINT piArray, int iCount = -1);
  563.     BOOL SetOrderArray(int iCount, LPINT piArray);
  564.     int OrderToIndex(int nOrder) const;
  565.  
  566. // Operations
  567.     int InsertItem(int nPos, HDITEM* phdi);
  568.     BOOL DeleteItem(int nPos);
  569.     BOOL Layout(HDLAYOUT* pHeaderLayout);
  570.     CImageList* CreateDragImage(int nIndex);
  571.     int SetHotDivider(CPoint pt);
  572.     int SetHotDivider(int nIndex);
  573.  
  574. // Overridables
  575.     virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
  576.  
  577. // Implementation
  578. public:
  579.     virtual ~CHeaderCtrl();
  580. protected:
  581.     virtual BOOL OnChildNotify(UINT, WPARAM, LPARAM, LRESULT*);
  582.  
  583. };
  584.  
  585. #if !defined(_WIN32_WCE)
  586. /////////////////////////////////////////////////////////////////////////////
  587. // CHotKeyCtrl
  588.  
  589. class CHotKeyCtrl : public CWnd
  590. {
  591.     DECLARE_DYNAMIC(CHotKeyCtrl)
  592.  
  593. // Constructors
  594. public:
  595.     CHotKeyCtrl();
  596.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  597.  
  598. // Attributes
  599.     void SetHotKey(WORD wVirtualKeyCode, WORD wModifiers);
  600.     DWORD GetHotKey() const;
  601.     void GetHotKey(WORD &wVirtualKeyCode, WORD &wModifiers) const;
  602.  
  603. // Operations
  604.     void SetRules(WORD wInvalidComb, WORD wModifiers);
  605.  
  606. // Implementation
  607. public:
  608.     virtual ~CHotKeyCtrl();
  609. };
  610. #endif // _WIN32_WCE
  611.  
  612. #if !defined(_WIN32_WCE_NO_TOOLTIPS)
  613. /////////////////////////////////////////////////////////////////////////////
  614. // CToolTipCtrl
  615.  
  616. class CToolTipCtrl : public CWnd
  617. {
  618.     DECLARE_DYNAMIC(CToolTipCtrl)
  619.  
  620. // Constructors
  621. public:
  622.     CToolTipCtrl();
  623.     BOOL Create(CWnd* pParentWnd, DWORD dwStyle = 0);
  624.  
  625. // Attributes
  626.     void GetText(CString& str, CWnd* pWnd, UINT nIDTool = 0) const;
  627.     BOOL GetToolInfo(CToolInfo& ToolInfo, CWnd* pWnd, UINT nIDTool = 0) const;
  628. WCE_DEL void SetToolInfo(LPTOOLINFO lpToolInfo);
  629.     void SetToolRect(CWnd* pWnd, UINT nIDTool, LPCRECT lpRect);
  630.     int GetToolCount() const;
  631.     int GetDelayTime(DWORD dwDuration) const;
  632.     void SetDelayTime(DWORD dwDuration, int iTime);
  633.     void GetMargin(LPRECT lprc) const;
  634.     void SetMargin(LPRECT lprc);
  635.     int GetMaxTipWidth() const;
  636.     int SetMaxTipWidth(int iWidth);
  637.     COLORREF GetTipBkColor() const;
  638.     void SetTipBkColor(COLORREF clr);
  639.     COLORREF GetTipTextColor() const;
  640.     void SetTipTextColor(COLORREF clr);
  641.  
  642. // Operations
  643.     void Activate(BOOL bActivate);
  644.  
  645.     BOOL AddTool(CWnd* pWnd, UINT nIDText, LPCRECT lpRectTool = NULL,
  646.         UINT nIDTool = 0);
  647.     BOOL AddTool(CWnd* pWnd, LPCTSTR lpszText = LPSTR_TEXTCALLBACK,
  648.         LPCRECT lpRectTool = NULL, UINT nIDTool = 0);
  649.  
  650.     void DelTool(CWnd* pWnd, UINT nIDTool = 0);
  651.  
  652. WCE_DEL BOOL HitTest(CWnd* pWnd, CPoint pt, LPTOOLINFO lpToolInfo) const;
  653.     void RelayEvent(LPMSG lpMsg);
  654.     void SetDelayTime(UINT nDelay);
  655.     void UpdateTipText(LPCTSTR lpszText, CWnd* pWnd, UINT nIDTool = 0);
  656.     void UpdateTipText(UINT nIDText, CWnd* pWnd, UINT nIDTool = 0);
  657.     void Update();
  658.  
  659.     void Pop();
  660.  
  661. // Implementation
  662. public:
  663. WCE_DEL void FillInToolInfo(TOOLINFO& ti, CWnd* pWnd, UINT nIDTool) const;
  664.     virtual ~CToolTipCtrl();
  665. #ifndef _AFXDLL
  666.     virtual BOOL DestroyToolTipCtrl();
  667. #else
  668.     BOOL DestroyToolTipCtrl();
  669. #endif
  670.  
  671. protected:
  672.     //{{AFX_MSG(CToolTipCtrl)
  673.     afx_msg LRESULT OnDisableModal(WPARAM, LPARAM);
  674.     afx_msg LRESULT OnWindowFromPoint(WPARAM, LPARAM);
  675.     afx_msg LRESULT OnAddTool(WPARAM, LPARAM);
  676.     afx_msg void OnEnable(BOOL bEnable);
  677.     //}}AFX_MSG
  678.     DECLARE_MESSAGE_MAP()
  679.  
  680.     CMapStringToPtr m_mapString;
  681.  
  682.     friend class CWnd;
  683.     friend class CToolBar;
  684. };
  685. #endif // _WIN32_WCE_NO_TOOLTIPS
  686.  
  687. /////////////////////////////////////////////////////////////////////////////
  688. // CTabCtrl
  689.  
  690. class CTabCtrl : public CWnd
  691. {
  692.     DECLARE_DYNAMIC(CTabCtrl)
  693.  
  694. // Constructors
  695. public:
  696.     CTabCtrl();
  697.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  698.  
  699. // Attributes
  700.     CImageList* GetImageList() const;
  701.     CImageList* SetImageList(CImageList* pImageList);
  702.     int GetItemCount() const;
  703.     BOOL GetItem(int nItem, TCITEM* pTabCtrlItem) const;
  704.     BOOL SetItem(int nItem, TCITEM* pTabCtrlItem);
  705.     BOOL SetItemExtra(int nBytes);
  706.     BOOL GetItemRect(int nItem, LPRECT lpRect) const;
  707.     int GetCurSel() const;
  708.     int SetCurSel(int nItem);
  709.     void SetCurFocus(int nItem);
  710.     CSize SetItemSize(CSize size);
  711.     void SetPadding(CSize size);
  712.     int GetRowCount() const;
  713. #if !defined(_WIN32_WCE_NO_TOOLTIPS)
  714.     CToolTipCtrl* GetToolTips() const;
  715.     void SetToolTips(CToolTipCtrl* pWndTip);
  716. #endif // _WIN32_WCE_NO_TOOLTIPS
  717.     int GetCurFocus() const;
  718.     int SetMinTabWidth(int cx);
  719.     DWORD GetExtendedStyle();
  720.     DWORD SetExtendedStyle(DWORD dwNewStyle, DWORD dwExMask = 0);
  721.     DWORD GetItemState(int nItem, DWORD dwMask) const;
  722.     BOOL SetItemState(int nItem, DWORD dwMask, DWORD dwState);
  723.  
  724. // Operations
  725.     BOOL InsertItem(int nItem, TCITEM* pTabCtrlItem);
  726.     BOOL InsertItem(int nItem, LPCTSTR lpszItem);
  727.     BOOL InsertItem(int nItem, LPCTSTR lpszItem, int nImage);
  728.     BOOL InsertItem(UINT nMask, int nItem, LPCTSTR lpszItem,
  729.         int nImage, LPARAM lParam);
  730.     BOOL InsertItem(UINT nMask, int nItem, LPCTSTR lpszItem,
  731.         int nImage, LPARAM lParam, DWORD dwState, DWORD dwStateMask);
  732.     BOOL DeleteItem(int nItem);
  733.     BOOL DeleteAllItems();
  734.     void AdjustRect(BOOL bLarger, LPRECT lpRect);
  735.     void RemoveImage(int nImage);
  736.     int HitTest(TCHITTESTINFO* pHitTestInfo) const;
  737.     void DeselectAll(BOOL fExcludeFocus);
  738.     BOOL HighlightItem(int idItem, BOOL fHighlight = TRUE);
  739.  
  740. // Overridables
  741.     virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
  742.  
  743. // Implementation
  744. public:
  745.     virtual ~CTabCtrl();
  746. protected:
  747.     virtual BOOL OnChildNotify(UINT, WPARAM, LPARAM, LRESULT*);
  748.     //{{AFX_MSG(CTabCtrl)
  749.     afx_msg void OnDestroy();
  750.     //}}AFX_MSG
  751.     DECLARE_MESSAGE_MAP()
  752. };
  753.  
  754. #if !defined(_WIN32_WCE)
  755. /////////////////////////////////////////////////////////////////////////////
  756. // CAnimateCtrl
  757.  
  758. class CAnimateCtrl : public CWnd
  759. {
  760.     DECLARE_DYNAMIC(CAnimateCtrl)
  761.  
  762. // Constructors
  763. public:
  764.     CAnimateCtrl();
  765.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  766.  
  767. // Operations
  768.     BOOL Open(LPCTSTR lpszFileName);
  769.     BOOL Open(UINT nID);
  770.     BOOL Play(UINT nFrom, UINT nTo, UINT nRep);
  771.     BOOL Stop();
  772.     BOOL Close();
  773.     BOOL Seek(UINT nTo);
  774.  
  775. // Implementation
  776. public:
  777.     virtual ~CAnimateCtrl();
  778. };
  779. #endif // _WIN32_WCE
  780.  
  781. /////////////////////////////////////////////////////////////////////////////
  782. // CImageList
  783.  
  784. class CImageList : public CObject
  785. {
  786.     DECLARE_DYNCREATE(CImageList)
  787.  
  788. // Constructors
  789. public:
  790.     CImageList();
  791.     BOOL Create(int cx, int cy, UINT nFlags, int nInitial, int nGrow);
  792.     BOOL Create(UINT nBitmapID, int cx, int nGrow, COLORREF crMask);
  793.     BOOL Create(LPCTSTR lpszBitmapID, int cx, int nGrow, COLORREF crMask);
  794.     BOOL Create(CImageList& imagelist1, int nImage1, CImageList& imagelist2,
  795.         int nImage2, int dx, int dy);
  796.     BOOL Create(CImageList* pImageList);
  797.  
  798. // Attributes
  799.     HIMAGELIST m_hImageList;            // must be first data member
  800.     operator HIMAGELIST() const;
  801.     HIMAGELIST GetSafeHandle() const;
  802.  
  803.     static CImageList* PASCAL FromHandle(HIMAGELIST hImageList);
  804.     static CImageList* PASCAL FromHandlePermanent(HIMAGELIST hImageList);
  805.     static void PASCAL DeleteTempMap(); 
  806.     BOOL Attach(HIMAGELIST hImageList);
  807.     HIMAGELIST Detach();
  808.  
  809.     int GetImageCount() const;
  810.     COLORREF SetBkColor(COLORREF cr);
  811.     COLORREF GetBkColor() const;
  812.     BOOL GetImageInfo(int nImage, IMAGEINFO* pImageInfo) const;
  813.  
  814. // Operations
  815.     BOOL DeleteImageList();
  816.     BOOL SetImageCount(UINT uNewCount);
  817.  
  818.     int Add(CBitmap* pbmImage, CBitmap* pbmMask);
  819.     int Add(CBitmap* pbmImage, COLORREF crMask);
  820.     BOOL Remove(int nImage);
  821.     BOOL Replace(int nImage, CBitmap* pbmImage, CBitmap* pbmMask);
  822.     int Add(HICON hIcon);
  823.     int Replace(int nImage, HICON hIcon);
  824.     HICON ExtractIcon(int nImage);
  825.     BOOL Draw(CDC* pDC, int nImage, POINT pt, UINT nStyle);
  826.     BOOL SetOverlayImage(int nImage, int nOverlay);
  827.     BOOL Copy(int iDst, int iSrc, UINT uFlags = ILCF_MOVE);
  828.     BOOL Copy(int iDst, CImageList* pSrc, int iSrc, UINT uFlags = ILCF_MOVE);
  829.     BOOL DrawIndirect(IMAGELISTDRAWPARAMS* pimldp);
  830.     BOOL DrawIndirect(CDC* pDC, int nImage, POINT pt, SIZE sz, POINT ptOrigin,
  831.             UINT fStyle = ILD_NORMAL, DWORD dwRop = SRCCOPY,
  832.             COLORREF rgbBack = CLR_DEFAULT, COLORREF rgbFore = CLR_DEFAULT);
  833.  
  834. #ifndef _AFX_NO_OLE_SUPPORT
  835.     BOOL Read(CArchive* pArchive);
  836.     BOOL Write(CArchive* pArchive);
  837. #endif
  838.  
  839. // Drag APIs
  840.     BOOL BeginDrag(int nImage, CPoint ptHotSpot);
  841.     static void PASCAL EndDrag();
  842.     static BOOL PASCAL DragMove(CPoint pt);
  843.     BOOL SetDragCursorImage(int nDrag, CPoint ptHotSpot);
  844.     static BOOL PASCAL DragShowNolock(BOOL bShow);
  845.     static CImageList* PASCAL GetDragImage(LPPOINT lpPoint, LPPOINT lpPointHotSpot);
  846.     static BOOL PASCAL DragEnter(CWnd* pWndLock, CPoint point);
  847.     static BOOL PASCAL DragLeave(CWnd* pWndLock);
  848.  
  849. // Implementation
  850. public:
  851.     virtual ~CImageList();
  852. #ifdef _DEBUG
  853.     virtual void Dump(CDumpContext& dc) const;
  854.     virtual void AssertValid() const;
  855. #endif
  856. };
  857.  
  858. /////////////////////////////////////////////////////////////////////////////
  859. // CToolBarCtrl
  860.  
  861. struct IDropTarget; // forward declaration
  862.  
  863. class CToolBarCtrl : public CWnd
  864. {
  865.     DECLARE_DYNAMIC(CToolBarCtrl)
  866. // Construction
  867. public:
  868.     CToolBarCtrl();
  869.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  870.  
  871. // Attributes
  872. public:
  873.     BOOL IsButtonEnabled(int nID) const;
  874.     BOOL IsButtonChecked(int nID) const;
  875.     BOOL IsButtonPressed(int nID) const;
  876.     BOOL IsButtonHidden(int nID) const;
  877.     BOOL IsButtonIndeterminate(int nID) const;
  878.     BOOL SetState(int nID, UINT nState);
  879.     int GetState(int nID) const;
  880.     BOOL GetButton(int nIndex, LPTBBUTTON lpButton) const;
  881.     int GetButtonCount() const;
  882.     BOOL GetItemRect(int nIndex, LPRECT lpRect) const;
  883.     BOOL GetRect(int nID, LPRECT lpRect) const;
  884.     void SetButtonStructSize(int nSize);
  885.     DWORD GetButtonSize() const;
  886.     BOOL SetButtonSize(CSize size);
  887.     BOOL SetBitmapSize(CSize size);
  888. #if !defined(_WIN32_WCE_NO_TOOLTIPS)
  889.     CToolTipCtrl* GetToolTips() const;
  890.     void SetToolTips(CToolTipCtrl* pTip);
  891. #endif // _WIN32_WCE_NO_TOOLTIPS
  892.     void SetOwner(CWnd* pWnd);
  893.     void SetRows(int nRows, BOOL bLarger, LPRECT lpRect);
  894.     int GetRows() const;
  895.     BOOL SetCmdID(int nIndex, UINT nID);
  896.     UINT GetBitmapFlags() const;
  897.     CImageList* GetDisabledImageList() const;
  898. WCE_DEL CImageList* GetHotImageList() const;
  899.     CImageList* GetImageList() const;
  900.     DWORD GetStyle() const;
  901.     int GetMaxTextRows() const;
  902.     BOOL IsButtonHighlighted(int nID) const;
  903.     BOOL SetButtonWidth(int cxMin, int cxMax);
  904.     CImageList* SetDisabledImageList(CImageList* pImageList);
  905.     CImageList* SetHotImageList(CImageList* pImageList);
  906.     CImageList* SetImageList(CImageList* pImageList);
  907. WCE_DEL HRESULT GetDropTarget(IDropTarget** ppDropTarget) const;
  908.     BOOL SetIndent(int iIndent);
  909.     BOOL SetMaxTextRows(int iMaxRows);
  910.     void SetStyle(DWORD dwStyle);
  911.     BOOL GetButtonInfo(int nID, TBBUTTONINFO* ptbbi) const;
  912.     BOOL SetButtonInfo(int nID, TBBUTTONINFO* ptbbi);
  913.     DWORD SetDrawTextFlags(DWORD dwMask, DWORD dwDTFlags);
  914. WCE_DEL BOOL GetAnchorHighlight() const;
  915. WCE_DEL BOOL SetAnchorHighlight(BOOL fAnchor = TRUE);
  916. WCE_DEL int GetHotItem() const;
  917. WCE_DEL int SetHotItem(int nHot);
  918. WCE_DEL void GetInsertMark(TBINSERTMARK* ptbim) const;
  919. WCE_DEL void SetInsertMark(TBINSERTMARK* ptbim);
  920. WCE_DEL BOOL GetMaxSize(LPSIZE pSize) const;
  921. WCE_DEL BOOL InsertMarkHitTest(LPPOINT ppt, LPTBINSERTMARK ptbim) const;
  922. WCE_DEL DWORD GetExtendedStyle() const;
  923. WCE_DEL DWORD SetExtendedStyle(DWORD dwExStyle);
  924. WCE_DEL COLORREF GetInsertMarkColor() const;
  925. WCE_DEL COLORREF SetInsertMarkColor(COLORREF clrNew);
  926.  
  927. // Operations
  928. public:
  929.     BOOL EnableButton(int nID, BOOL bEnable = TRUE);
  930.     BOOL CheckButton(int nID, BOOL bCheck = TRUE);
  931.     BOOL PressButton(int nID, BOOL bPress = TRUE);
  932.     BOOL HideButton(int nID, BOOL bHide = TRUE);
  933.     BOOL Indeterminate(int nID, BOOL bIndeterminate = TRUE);
  934.     int AddBitmap(int nNumButtons, UINT nBitmapID);
  935.     int AddBitmap(int nNumButtons, CBitmap* pBitmap);
  936.     BOOL AddButtons(int nNumButtons, LPTBBUTTON lpButtons);
  937.     BOOL InsertButton(int nIndex, LPTBBUTTON lpButton);
  938.     BOOL DeleteButton(int nIndex);
  939.     UINT CommandToIndex(UINT nID) const;
  940. WCE_DEL void SaveState(HKEY hKeyRoot, LPCTSTR lpszSubKey,
  941. WCE_DEL        LPCTSTR lpszValueName);
  942. WCE_DEL void RestoreState(HKEY hKeyRoot, LPCTSTR lpszSubKey,
  943. WCE_DEL        LPCTSTR lpszValueName);
  944.     void LoadImages(int iBitmapID, HINSTANCE hinst);
  945. WCE_DEL BOOL MapAccelerator(TCHAR chAccel, UINT* pIDBtn);
  946. WCE_DEL BOOL MarkButton(int nID, BOOL fHighlight = TRUE);
  947. WCE_DEL BOOL MoveButton(UINT nOldPos, UINT nNewPos);
  948.     int HitTest(LPPOINT ppt) const;
  949.  
  950. WCE_DEL void Customize();
  951.     int AddString(UINT nStringID);
  952.     int AddStrings(LPCTSTR lpszStrings);
  953.     void AutoSize();
  954.  
  955. // Implementation
  956. public:
  957.     virtual ~CToolBarCtrl();
  958.  
  959. protected:
  960.     //{{AFX_MSG(CToolBarCtrl)
  961.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  962.     //}}AFX_MSG
  963.     DECLARE_MESSAGE_MAP()
  964. };
  965.  
  966. class CReBarCtrl : public CWnd
  967. {
  968.     DECLARE_DYNAMIC(CReBarCtrl)
  969. // Construction
  970. public:
  971.     CReBarCtrl();
  972.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  973.  
  974. // Attributes
  975. public:
  976.     UINT GetBandCount() const;
  977.     BOOL GetBandInfo(UINT uBand, REBARBANDINFO* prbbi) const;
  978.     UINT GetBarHeight() const;
  979.     BOOL GetBarInfo(REBARINFO* prbi) const;
  980.     COLORREF GetBkColor() const;
  981. WCE_DEL IDropTarget* GetDropTarget() const;
  982.     BOOL GetRect(UINT uBand, LPRECT prc) const;
  983.     UINT GetRowCount() const;
  984.     UINT GetRowHeight(UINT uRow) const;
  985.     COLORREF GetTextColor() const;
  986. #if !defined(_WIN32_WCE_NO_TOOLTIPS)
  987.     CToolTipCtrl* GetToolTips() const;
  988. #endif // _WIN32_WCE_NO_TOOLTIPS
  989.     int IDToIndex(UINT uBandID) const;
  990.     BOOL SetBandInfo(UINT uBand, REBARBANDINFO* prbbi);
  991.     BOOL SetBarInfo(REBARINFO* prbi);
  992.     COLORREF SetBkColor(COLORREF clr);
  993.     CWnd* SetOwner(CWnd* pWnd);
  994.     COLORREF SetTextColor(COLORREF clr);
  995. #if !defined(_WIN32_WCE_NO_TOOLTIPS)
  996.     void SetToolTips(CToolTipCtrl* pToolTip);
  997. #endif // _WIN32_WCE_NO_TOOLTIPS
  998.     CImageList* GetImageList() const;
  999.     BOOL SetImageList(CImageList* pImageList);
  1000.     void GetBandBorders(UINT uBand, LPRECT prc) const;
  1001. WCE_DEL CPalette* GetPalette() const;
  1002. WCE_DEL CPalette* SetPalette(HPALETTE hPal);
  1003. WCE_DEL BOOL GetColorScheme(COLORSCHEME* lpcs);
  1004. WCE_DEL void SetColorScheme(const COLORSCHEME* lpcs);
  1005.  
  1006. // Operations
  1007. public:
  1008.     void BeginDrag(UINT uBand, DWORD dwPos = (DWORD)-1);
  1009.     BOOL DeleteBand(UINT uBand);
  1010.     void DragMove(DWORD dwPos = (DWORD)-1);
  1011.     void EndDrag();
  1012.     int HitTest(RBHITTESTINFO* prbht);
  1013.     BOOL InsertBand(UINT uIndex, REBARBANDINFO* prbbi);
  1014.     void MaximizeBand(UINT uBand);
  1015.     void MinimizeBand(UINT uBand);
  1016.     BOOL ShowBand(UINT uBand, BOOL fShow = TRUE);
  1017.     BOOL SizeToRect(CRect& rect);
  1018. WCE_DEL BOOL MoveBand(UINT uFrom, UINT uTo);
  1019. };
  1020.  
  1021. #ifndef _AFX_NO_RICHEDIT_SUPPORT
  1022. /////////////////////////////////////////////////////////////////////////////
  1023. // CRichEditCtrl
  1024.  
  1025. class CRichEditCtrl : public CWnd
  1026. {
  1027.     DECLARE_DYNAMIC(CRichEditCtrl)
  1028.  
  1029. // Constructors
  1030. public:
  1031.     CRichEditCtrl();
  1032.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  1033.  
  1034. // Attributes
  1035.     BOOL CanUndo() const;
  1036.     int GetLineCount() const;
  1037.     BOOL GetModify() const;
  1038.     void SetModify(BOOL bModified = TRUE);
  1039.     void GetRect(LPRECT lpRect) const;
  1040.     CPoint GetCharPos(long lChar) const;
  1041.     void SetOptions(WORD wOp, DWORD dwFlags);
  1042.  
  1043.     // NOTE: first word in lpszBuffer must contain the size of the buffer!
  1044.     int GetLine(int nIndex, LPTSTR lpszBuffer) const;
  1045.     int GetLine(int nIndex, LPTSTR lpszBuffer, int nMaxLength) const;
  1046.  
  1047.     BOOL CanPaste(UINT nFormat = 0) const;
  1048.     void GetSel(long& nStartChar, long& nEndChar) const;
  1049.     void GetSel(CHARRANGE &cr) const;
  1050.     void LimitText(long nChars = 0);
  1051.     long LineFromChar(long nIndex) const;
  1052.     void SetSel(long nStartChar, long nEndChar);
  1053.     void SetSel(CHARRANGE &cr);
  1054.     DWORD GetDefaultCharFormat(CHARFORMAT &cf) const;
  1055.     DWORD GetSelectionCharFormat(CHARFORMAT &cf) const;
  1056.     long GetEventMask() const;
  1057.     long GetLimitText() const;
  1058.     DWORD GetParaFormat(PARAFORMAT &pf) const;
  1059.     // richedit EM_GETSELTEXT is ANSI
  1060.     long GetSelText(LPSTR lpBuf) const;
  1061.     CString GetSelText() const;
  1062.     WORD GetSelectionType() const;
  1063.     COLORREF SetBackgroundColor(BOOL bSysColor, COLORREF cr);
  1064.     BOOL SetDefaultCharFormat(CHARFORMAT &cf);
  1065.     BOOL SetSelectionCharFormat(CHARFORMAT &cf);
  1066.     BOOL SetWordCharFormat(CHARFORMAT &cf);
  1067.     DWORD SetEventMask(DWORD dwEventMask);
  1068.     BOOL SetParaFormat(PARAFORMAT &pf);
  1069.     BOOL SetTargetDevice(HDC hDC, long lLineWidth);
  1070.     BOOL SetTargetDevice(CDC &dc, long lLineWidth);
  1071.     long GetTextLength() const;
  1072.     BOOL SetReadOnly(BOOL bReadOnly = TRUE);
  1073.     int GetFirstVisibleLine() const;
  1074.  
  1075. // Operations
  1076.     void EmptyUndoBuffer();
  1077.  
  1078.     int LineIndex(int nLine = -1) const;
  1079.     int LineLength(int nLine = -1) const;
  1080.     void LineScroll(int nLines, int nChars = 0);
  1081.     void ReplaceSel(LPCTSTR lpszNewText, BOOL bCanUndo = FALSE);
  1082.     void SetRect(LPCRECT lpRect);
  1083.  
  1084.     BOOL DisplayBand(LPRECT pDisplayRect);
  1085.     long FindText(DWORD dwFlags, FINDTEXTEX* pFindText) const;
  1086.     long FormatRange(FORMATRANGE* pfr, BOOL bDisplay = TRUE);
  1087.     void HideSelection(BOOL bHide, BOOL bPerm);
  1088.     void PasteSpecial(UINT nClipFormat, DWORD dvAspect = 0, HMETAFILE hMF = 0);
  1089.     void RequestResize();
  1090.     long StreamIn(int nFormat, EDITSTREAM &es);
  1091.     long StreamOut(int nFormat, EDITSTREAM &es);
  1092.  
  1093.     // Clipboard operations
  1094.     BOOL Undo();
  1095.     void Clear();
  1096.     void Copy();
  1097.     void Cut();
  1098.     void Paste();
  1099.  
  1100. // OLE support
  1101.     IRichEditOle* GetIRichEditOle() const;
  1102.     BOOL SetOLECallback(IRichEditOleCallback* pCallback);
  1103.  
  1104. // Implementation
  1105. public:
  1106.     virtual ~CRichEditCtrl();
  1107. };
  1108. #endif //!_AFX_NO_RICHEDIT_SUPPORT
  1109.  
  1110.  
  1111. /////////////////////////////////////////////////////////////////////////////
  1112. // CIPAddressCtrl
  1113.  
  1114. class CIPAddressCtrl : public CWnd
  1115. {
  1116.     DECLARE_DYNAMIC(CIPAddressCtrl)
  1117.  
  1118. // Constructors
  1119.     CIPAddressCtrl();
  1120.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  1121.  
  1122. // Attributes
  1123.     BOOL IsBlank() const;
  1124.     void ClearAddress();
  1125.     int GetAddress(BYTE& nField0, BYTE& nField1, BYTE& nField2, BYTE& nField3);
  1126.     int GetAddress(DWORD& dwAddress);
  1127.     void SetAddress(DWORD dwAddress); 
  1128.     void SetAddress(BYTE nField0, BYTE nField1, BYTE nField2, BYTE nField3); 
  1129.     void SetFieldFocus(WORD nField); 
  1130.     void SetFieldRange(int nField, BYTE nLower, BYTE nUpper); 
  1131.  
  1132. // Implementation
  1133. public:
  1134.     virtual ~CIPAddressCtrl();
  1135. };
  1136.  
  1137. /////////////////////////////////////////////////////////////////////////////
  1138. // Inline function declarations
  1139.  
  1140. #ifdef _AFX_PACKING
  1141. #pragma pack(pop)
  1142. #endif
  1143.  
  1144. #ifdef _AFX_ENABLE_INLINES
  1145. #define _AFXCMN_INLINE AFX_INLINE
  1146. #include <afxcmn.inl>
  1147. #include <afxcmn2.inl>
  1148. #undef _AFXCMN_INLINE
  1149. #endif
  1150.  
  1151. #undef AFX_DATA
  1152. #define AFX_DATA
  1153.  
  1154. #ifdef _AFX_MINREBUILD
  1155. #pragma component(minrebuild, on)
  1156. #endif
  1157. #ifndef _AFX_FULLTYPEINFO
  1158. #pragma component(mintypeinfo, off)
  1159. #endif
  1160.  
  1161. #endif //__AFXCMN_H__
  1162.  
  1163. /////////////////////////////////////////////////////////////////////////////
  1164.